<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Requests\UserContext;
use App\Http\Services\CourseService;
use App\Http\Traits\ResponseJson;

class CourseController extends Controller
{
    use ResponseJson;

    protected $courseService;

    public function __construct(CourseService $courseService)
    {
        $this->courseService = $courseService;
    }

    public function campusCourseLists()
    {
        $data = $this->courseService->campusCourseLists();
        return $this->returnJson($data);
    }

    public function lists()
    {
        $data = $this->courseService->lists();
        return $this->returnJson($data);
    }

    public function detail()
    {
        $data = $this->courseService->detail();
        return $this->returnJson($data);
    }

    public function categoryLists()
    {
        $data = $this->courseService->categoryLists();
        return $this->returnJson($data);
    }

    public function monthOrWeek()
    {
        $data = $this->courseService->monthOrWeek();
        return $this->returnJson($data);
    }

    public function listWithTime()
    {
        $data = $this->courseService->listWithTime();
        return $this->returnJson($data);
    }

    public function sign(UserContext $userContext)
    {
        $data = $this->courseService->sign($userContext);
        return $this->returnJson($data);
    }

    public function gateStatics(UserContext $userContext)
    {
        $data = $this->courseService->gateStatics($userContext);
        return $this->returnJson($data);
    }

    public function giveScore(UserContext $userContext)
    {
        $data = $this->courseService->giveScore($userContext);
        return $this->returnJson($data);
    }

    public function waterList()
    {
        $data = $this->courseService->waterList();
        return $this->returnJson($data);
    }

    public function recommendDetail()
    {
        $data = $this->courseService->recommendDetail();
        return $this->returnJson($data);
    }

    public function swiperList()
    {
        $data = $this->courseService->swiperList();
        return $this->returnJson($data);
    }

    public function normalDetail()
    {
        $data = $this->courseService->normalDetail();
        return $this->returnJson($data);
    }

}
